//
//  QQFriendSectionHeaderView.h
//  Qya
//
//  Created by shoguncao on 12-9-9.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol SectionHeaderViewDelegate;

@interface QQFriendSectionHeaderView : UIView

@property (nonatomic, weak) UILabel *titleLabel;
@property (nonatomic, weak) UIButton *disclosureButton;
@property (nonatomic, assign) NSInteger section;
@property (nonatomic, retain) UIButton *checkButton;
@property (nonatomic, weak) UILabel *isOpenLabel;
@property (nonatomic, weak) id <SectionHeaderViewDelegate> delegate;

- (id)initWithFrame:(CGRect)frame title:(NSString*)title section:(NSInteger)sectionNumber isOpen:(BOOL)isOpen delegate:(id <SectionHeaderViewDelegate>)delegate;
- (void)toggleOpenWithUserAction:(BOOL)userAction;

@end



/*
 Protocol to be adopted by the section header's delegate; the section header tells its delegate when the section should be opened and closed.
 */
@protocol SectionHeaderViewDelegate <NSObject>

@optional
- (void)sectionHeaderView:(QQFriendSectionHeaderView *)sectionHeaderView sectionOpened:(NSInteger)section;
- (void)sectionHeaderView:(QQFriendSectionHeaderView *)sectionHeaderView sectionClosed:(NSInteger)section;

@end
